package com.lu.proxy;

import com.lu.proxy.myproxy.ProxyClothFactory;
import com.lu.proxy.toproxy.NickClothaFactory;

/**
 * @Date:2021/11/8/21:23
 * @Description:静态代理举例
 * 特点：代理类和被代理类在编译期间就被确定下来，不利于扩展
 */
public class StaticProxyTest {

    public static void main(String[] args) {

        NickClothaFactory nickClothaFactory = new NickClothaFactory();

        ProxyClothFactory proxyClothFactory = new ProxyClothFactory(nickClothaFactory);
        proxyClothFactory.produceCloth();
    }

}
